From 7470d0c932d1ef782c4372f4fd491cebde6f82b3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Fri, 5 Nov 2010 18:01:16 +0000 Subject: [PATCH] Follow-up r76113, r76114: undeclared global, unnecessary global + some whitespace fixes --- includes/filerepo/ForeignAPIFile.php | 12 +++++------- includes/filerepo/ForeignAPIRepo.php | 1 + 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/includes/filerepo/ForeignAPIFile.php b/includes/filerepo/ForeignAPIFile.php index d1e38ea26b..9869188721 100644 --- a/includes/filerepo/ForeignAPIFile.php +++ b/includes/filerepo/ForeignAPIFile.php @@ -66,9 +66,9 @@ class ForeignAPIFile extends File { return parent::transform( $params, $flags ); } $thumbUrl = $this->repo->getThumbUrlFromCache( - $this->getName(), - isset( $params['width'] ) ? $params['width'] : -1, - isset( $params['height'] ) ? $params['height'] : -1 ); + $this->getName(), + isset( $params['width'] ) ? $params['width'] : -1, + isset( $params['height'] ) ? $params['height'] : -1 ); return $this->handler->getTransform( $this, 'bogus', $thumbUrl, $params ); } @@ -154,15 +154,13 @@ class ForeignAPIFile extends File { */ function getThumbPath( $suffix = '' ) { if ( $this->repo->canCacheThumbs() ) { - global $wgUploadDirectory; $path = $this->repo->getZonePath('thumb') . '/' . $this->getHashPath( $this->getName() ); if ( $suffix ) { $path = $path . $suffix . '/'; } return $path; - } - else { - return null; + } else { + return null; } } diff --git a/includes/filerepo/ForeignAPIRepo.php b/includes/filerepo/ForeignAPIRepo.php index bf2b3dc499..ddbfb00463 100644 --- a/includes/filerepo/ForeignAPIRepo.php +++ b/includes/filerepo/ForeignAPIRepo.php @@ -36,6 +36,7 @@ class ForeignAPIRepo extends FileRepo { function __construct( $info ) { parent::__construct( $info ); + global $wgUploadDirectory; // http://commons.wikimedia.org/w/api.php $this->mApiBase = isset( $info['apibase'] ) ? $info['apibase'] : null; -- 2.20.1